Host systems such as Personal Computers (PC's) store large amounts of data in mass-storage devices such as hard disk drives (HDD). Mass-storage devices are sector-addressable rather than byte-addressable, since the smallest unit of flash memory that can be read or written is a page that is several 512-byte sectors in size. Flash memory is replacing hard disks and optical disks as the preferred mass-storage medium.
NAND flash memory is a type of flash memory constructed from electrically-erasable programmable read-only memory (EEPROM) cells, which have floating gate transistors. These cells use quantum-mechanical tunnel injection for writing and tunnel release for erasing. NAND flash is non-volatile so it is ideal for portable devices storing data. NAND flash tends to be denser and less expensive than NOR flash memory.
However, NAND flash has limitations. In the flash memory cells, the data is stored in binary terms—as ones (1) and zeros (0). One limitation of NAND flash is that when storing data (writing to flash), the flash can only write from ones (1) to zeros (0). When writing from zeros (0) to ones (1), the flash needs to be erased a “block” at a time. Although the smallest unit for read can be a byte or a word within a page, the smallest unit for erase is a block.
Single Level Cell (SLC) flash and Multi Level Cell (MLC) flash are two types of NAND flash. The erase block size of SLC flash may be 128K+4K bytes while the erase block size of MLC flash may be 256K+8K bytes. Another limitation is that NAND flash memory has a finite number of erase cycles between 10,000 and 100,000, after which the flash wears out and becomes unreliable.
Comparing MLC flash with SLC flash, MLC flash memory has advantages and disadvantages in consumer applications. In the cell technology, SLC flash stores a single bit of data per cell, whereas MLC flash stores two or more bits of data per cell. MLC flash can have twice or more the density of SLC flash with the same technology. But the performance, reliability and durability may decrease for MLC flash.
MLC flash has a higher storage density and is thus better for storing long sequences of data; yet the reliability of MLC is less than that of SLC flash. Data that is changed more frequently is better stored in SLC flash, since SLC is more reliable and rapidly-changing data is more likely to be critical data than slowly changing data. Also, smaller units of data may more easily be aggregated together into SLC than MLC, since SLC often has fewer restrictions on write sequences than does MLC.
A consumer may desire a large capacity flash-memory system, perhaps as a replacement for a hard disk. A solid-state disk (SSD) made from flash-memory chips has no moving parts and is thus more reliable than a rotating disk.
Several smaller flash drives could be connected together, such as by plugging many flash drives into a USB hub that is connected to one USB port on a host, but then these flash drives appear as separate drives to the host. For example, the host's operating system may assign each flash drive its own drive letter (D:, E:, F:, etc.) rather than aggregate them together as one logical drive, with one drive letter. A similar problem could occur with other bus protocols, such as Serial AT-Attachment (SATA), integrated device electronics (IDE), Serial small-computer system interface (SCSI) (SAS) bus, a fiber-channel bus, and Peripheral Components Interconnect Express (PCIe). The parent application, now U.S. Pat. No. 7,103,684, describes a single-chip controller that connects to several flash-memory mass-storage blocks.
Larger flash systems may use multiple channels to allow parallel access, improving performance. A wear-leveling algorithm allows the memory controller to remap logical addresses to any different physical addresses so that data writes can be evenly distributed. Thus the wear-leveling algorithm extends the endurance of the flash memory, especially MLC-type flash memory.
Multi-channel flash systems may have several channels that data is striped across. While such data striping can improve performance since multiple channels may be written at the same time, some storage area may be lost due to truncation where the storage capacity of all channels is set to match the capacity of the smallest channel. As the flash memory system wears, more bad blocks appear, reducing the available storage capacity. Since these bad blocks may appear at random locations, the channels may diverge in capacity over time. When channels have widely differing available capacities, much space is wasted in the larger channels.
What is desired is a multi-channel flash system that recovers or salvages wasted space due to truncation for cases of non-redundancy architectures. A mapping structure is desirable to map logical addresses to physical blocks in the flash memory. Portions of the extra space can be used as extra capacity. Extra space then can be used as replacement capacity for other drive with too many bad blocks.